package com.dsw.demo.rabbitmq.service;

import com.dsw.demo.rabbitmq.config.TopicRabbitMQConfig;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class TopicReceiver {

    @RabbitListener(queues = TopicRabbitMQConfig.TOPICQUEUEA)
    public void topicReceiverA(String msg) {
        System.out.println("topic queue a message:" + msg);
    }

    @RabbitListener(queues = TopicRabbitMQConfig.TOPICQUEUEB)
    public void topicReceiverB(String msg) {
        System.out.println("topic queue b message:" + msg);
    }


}
